#include<iostream>
using namespace std;
int main(){
  int n,i,b;
  cin>>n;
  int a[31];
  a[1]=1;
  a[2]=1;
  for(i=3;i<=30;i++)a[i]=a[i-1]+a[i-2];
  for(i=0;i<n;i++){
    cin>>b;
    cout<<a[b]<<endl;
  }
}